<template>
  <div class="app-container">
     <!-- <div class="detail-title">自定义方法模块</div> -->
    <div class="container">
      <div class="container-warp container-left" style="height: 275px;padding: 5px 10px 0;width:100%">
        <div class="table-title">结构</div>
        <el-row :gutter="20">
          <el-col :span="24" class="material-form">
            <el-form ref="mform" :model="form" label-width="80px" :inline="true" label-position="left" :rules="mrules">
              <el-form-item prop="fx">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊趾X方向牛顿力Fx [N]" placement="top" effect="light">
                      <div>
                        Fx [N]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.fx" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="fy">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊趾Y方向牛顿力Fy [N]" placement="top" effect="light">
                      <div>
                       Fy [N]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.fy" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="fz">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊趾Z方向牛顿力Fz [N]" placement="top" effect="light">
                      <div>
                        Fz [N]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.fz" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="mx">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊趾X方向力矩Mx [N*mm]" placement="top" effect="light">
                      <div>
                        Mx [N*mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.mx" placeholder="" type="number"></el-input>
              </el-form-item>

              <el-form-item prop="my">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊趾Y方向力矩My [N*mm]" placement="top" effect="light">
                      <div>
                        My [N*mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.my" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="mz">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊趾Z方向力矩Mz [N*mm]" placement="top" effect="light">
                      <div>
                        Mz [N*mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.mz" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="tw">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊喉宽度tw [mm]" placement="top" effect="light">
                      <div>
                        tw [mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.tw" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="tb">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="立板厚度tb [mm]" placement="top" effect="light">
                      <div>
                        tb [mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.tb" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="sw">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="截面模量Sw [mm]" placement="top" effect="light">
                      <div>
                        Sw [mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.sw" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="aw">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="焊喉尺寸Aw [mm]" placement="top" effect="light">
                      <div>
                        Aw [mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.aw" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-form-item prop="fa">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="许用应力Fa [MPa]" placement="top" effect="light">
                      <div>
                        Fa [MPa]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.fa" placeholder="" type="number"></el-input>
              </el-form-item>

              <el-form-item prop="l">
                <template solt="label">
                  <div class="label-subscript">
                    <el-tooltip content="载荷分布长度L [mm]" placement="top" effect="light">
                      <div>
                        L [mm]
                      </div>
                    </el-tooltip>
                  </div>
                </template>
                <el-input v-model="form.l" placeholder="" type="number"></el-input>
              </el-form-item>
              <el-button type="primary" @click="count(form)"> <svg-icon icon-class="line-bar"/>计算</el-button>
            </el-form>
          </el-col>
        </el-row>
      </div>
    </div>
    <div class="line-warp"></div>
    <div class="container container-bottom">
      <div class="container-warp container-left" style="height: 100%;width:100%">
        <div class="label-title">强度评价</div>
        <div class="label-log-form pj" v-if="showResult == true">
          <el-form ref="form" label-width="160px" :inline="true" label-position="left">
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="载荷分布长度L [mm]" placement="top" effect="light">
                    <div>
                      L [mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k0}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾X方向牛顿力Fx [N]" placement="top" effect="light">
                    <div>
                      Fx [N]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k1}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Y方向牛顿力Fy [N]" placement="top" effect="light">
                    <div>
                      Fy [N]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k2}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Z方向牛顿力Fz [N] " placement="top" effect="light">
                    <div>
                      Fz [N]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k3}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾X方向力矩Mx [N*mm]  " placement="top" effect="light">
                    <div>
                      Mx [N*mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k4}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Y方向力矩My [N*mm]" placement="top" effect="light">
                    <div>
                      My [N*mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k5}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Z方向力矩Mz [N*mm] " placement="top" effect="light">
                    <div>
                      Mz [N*mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k6}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾X方向线载荷Fx/L [N/mm]  " placement="top" effect="light">
                    <div>
                      Fx/L [N/mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k7}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Y方向线载荷Fy/L [N/mm] " placement="top" effect="light">
                    <div>
                      Fy/L [N/mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k8}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Z方向线载荷Fz/L [N/mm] " placement="top" effect="light">
                    <div>
                      Fz/L [N/mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k9}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾X方向线力矩Mx/L [N/mm]  " placement="top" effect="light">
                    <div>
                      Mx/L [N/mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k10}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Y方向线力矩My/L [N/mm] " placement="top" effect="light">
                    <div>
                      My/L [N/mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k11}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊趾Z方向线力矩Mz/L [N/mm]  " placement="top" effect="light">
                    <div>
                      Mz/L [N/mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k12}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="法向载荷产生的应力σn [MPa] " placement="top" effect="light">
                    <div>
                      σn [MPa]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k13}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="弯曲载荷产生的应力σb [MPa]" placement="top" effect="light">
                    <div>
                      σb [MPa]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k14}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="以X方向为法向的平面上的剪切应力σsx [MPa] " placement="top" effect="light">
                    <div>
                     σsx [MPa]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k15}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="以Y方向为法向的平面上的剪切应力σsy [MPa] " placement="top" effect="light">
                    <div>
                      σsy [MPa]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k16}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="剪切载荷产生的应力σs [MPa] " placement="top" effect="light">
                    <div>
                      σs [MPa]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k17}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊缝合成应力σweld [MPa] " placement="top" effect="light">
                    <div>
                      σweld [MPa]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k18}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊喉宽度tw [mm] " placement="top" effect="light">
                    <div>
                      tw [mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k19}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊喉尺寸Aw [mm] " placement="top" effect="light">
                    <div>
                      Aw [mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k20}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="截面模量Sw [mm] " placement="top" effect="light">
                    <div>
                      Sw [mm]
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k21}}
            </el-form-item>
            <el-form-item label="">
              <template solt="label">
                <div class="label-subscript">
                  <el-tooltip content="焊缝静强度利用率UR" placement="top" effect="light">
                    <div>
                      UR
                    </div>
                  </el-tooltip>
                </div>
              </template>
              {{k22}}
            </el-form-item>
          </el-form>
        </div>
        <!-- <div  v-if="showResult == true" class="log-warp" :style="'height:'+(logContentHeight-20)+'px'">
          <div class="log-content divcontainer wrap-text" style="white-space:pre">
            <span class="badge" @click="showLogModel">
              <img src="@/assets/images/big_X.png" style="width: 30px;height: 30px;">
              </span>
            {{ logText }}
          </div>
        </div> -->
        <!-- <el-button type="primary" class="detail-center-btn" >
          <svg-icon icon-class="user-list"/>
          打开日志文件
        </el-button> -->
      </div>
      <div class="container-warp container-right" style="display: none;">
        <div class="label-title" style="margin-bottom: 10px">结构P-S-N图</div>
        <el-carousel  v-if="showResult == true" arrow="always" class="chart-warp" :style="'height:'+(logContentHeight+50)+'px'">
          <el-carousel-item v-for="item in 2" :key="item">
            <!-- <h3 class="small">{{ item }}</h3> -->
            <!-- {{ logContentHeight }} -->
            <sn-chart :chartData="getChartDataForItem(item)"  ref="snchart"/>
          </el-carousel-item>
        </el-carousel>
      </div>
    </div>
    <el-dialog
      width="80%"
      title="日志"
      :visible.sync="logModel"
      >
      <div class="wrap-text" :style="'height:'+ heightTestData +'px;overflow-y: auto;white-space:pre'">
        {{ logText }}
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import service from "@/api/material";
  import SnChart from "./snChart";
  export default {
    name: "Dvs160826",
    components: {
      SnChart
    },
    props: {
      data: {
        type: Object
      },
      // 值
      value: [String, Object, Array],
      // 数量限制
      limit: {
        type: Number,
        default: 1,
      },
      // 大小限制(MB)
      fileSize: {
        type: Number,
        default: 5,
      },
      // 文件类型, 例如['png', 'jpg', 'jpeg']
      fileType: {
        type: Array,
        default: () => ["xlsx", "xls"],
      },
    },
    data() {
      return {
        showTip: false,
        mrules:{
          fx: [{
            required: true,
            message: '焊趾X方向牛顿力Fx [N]不能为空',
            trigger: 'blur'
          }],
          fy: [{
            required: true,
            message: '焊趾Y方向牛顿力Fy不能为空',
            trigger: 'blur'
          }],
          fz: [{
            required: true,
            message: '焊趾Z方向牛顿力Fz不能为空',
            trigger: 'blur'
          }],
          mx: [{
            required: true,
            message: '焊趾X方向力矩Mx不能为空',
            trigger: 'blur'
          }],
          my: [{
            required: true,
            message: '焊趾Y方向力矩My不能为空',
            trigger: 'blur'
          }],
          mz: [{
            required: true,
            message: '焊趾Z方向力矩Mz不能为空',
            trigger: 'blur'
          }],
          tw: [{
            required: true,
            message: '焊喉宽度tw不能为空',
            trigger: 'blur'
          }],
          tb: [{
            required: true,
            message: '立板厚度tb不能为空',
            trigger: 'blur'
          }],
          sw: [{
            required: true,
            message: '截面模量Sw不能为空',
            trigger: 'blur'
          }],
          aw: [{
            required: true,
            message: '焊喉尺寸Aw不能为空',
            trigger: 'blur'
          }],
          fa: [{
            required: true,
            message: '许用应力Fa不能为空',
            trigger: 'blur'
          }],
          l: [{
            required: true,
            message: '载荷分布长度L不能为空',
            trigger: 'blur'
          }],
        },
        form:{},
        item: [1],
        logText: '',
        moduleClassSelectList: [
          {value: 'BS7608_003', label: 'BS7608室温环境钢结构疲劳寿命预测',},
          {value: 'BS7608_004', label: 'BS7608海水环境钢结构疲劳寿命预测',},
          {value: 'BS7608_005', label: 'BS7608改进性能后焊接接头疲劳寿命预测',},
        ],
        JGSelectList: [
          {value: 0, label: '不修正',},
          {value: 1, label: '修正',},
        ],
        IMSelectList: [
          {value: 1, label: '细晶结构钢',},
          {value: 2, label: '不锈钢',},
          {value: 3, label: '淬火钢',},
          {value: 4, label: '锻钢',},
          {value: 5, label: '其他钢',},
          {value: 6, label: '一般用途铸钢和热处理铸钢',},
          {value: 7, label: '球墨铸铁',},
          {value: 8, label: '可锻铸铁',},
          {value: 9, label: '片状石墨铸铁',},
          {value: 10, label: '挤压铝合金',},
          {value: 11, label: '变形铝合金',},
        ],
        logModel: false,
        wdModel1: false,
        wdModel2: false,
        dllModel: false,
        heightTestData: '',
        logContentHeight: '',
        number: 0,
        uploadList: [],
        fileList: [],
        dl: '',
        ts: '',
        abk: '',
        loglineChartData: {},
        showResult: false,
        showSN: false,
        k0: null,
        k1: null,
        k2: null,
        k3: null,
        k4: null,
        k5: null,
        k6: null,
        k7: null,
        k8: null,
        k9: null,
        k10: null,
        k11: null,
        k12: null,
        k13: null,
        k14: null,
        k15: null,
        k16: null,
        k17: null,
        k18: null,
        k19: null,
        k20: null,
        k21: null,
        k22: null,
        k23: null,
        loglineChartData1: {},
        loglineChartData2: {},
        loglineChartData3: {},
        loglineChartData4: {},
        selectedLabel1: "正向疲劳强度MKJ图",
        selectedLabel2: "切向疲劳强度MKJ图",
      };
    },
    created() {
      this.logContentHeight = window.innerHeight - 570
    },
    watch: {
      value: {
        handler(val) {
          if (val) {
            let temp = 1;
            // 首先将值转为数组
            const list = Array.isArray(val) ? val : this.value.split(',');
            // 然后将数组转为对象数组
            this.fileList = list.map(item => {
              if (typeof item === "string") {
                item = { name: item, url: item };
              }
              item.uid = item.uid || new Date().getTime() + temp++;
              return item;
            });
          } else {
            this.fileList = [];
            return [];
          }
        },
        deep: true,
        immediate: true
      }
    },
    mounted() {
      this.$nextTick(()=>{
        this.heightTestData = window.innerHeight - 300
      })
      this.showResult = false
      this.showSN = false
    },
    methods: {
      getChartDataForItem(item) {
          return this[`loglineChartData${item}`];

      },
      showWdModel1() {
        this.wdModel1 = true
      },
      showWdModel2() {
        this.wdModel2 = true
      },
      showLogModel() {
        this.logModel = true
      },
      // 上传前校检格式和大小
      handleBeforeUpload(file) {
        // 校检文件类型
        if (this.fileType) {
          const fileName = file.name.split('.');
          const fileExt = fileName[fileName.length - 1];
          const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
          if (!isTypeOk) {
            this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
            return false;
          }
        }
        // 校检文件大小
        if (this.fileSize) {
          const isLt = file.size / 1024 / 1024 < this.fileSize;
          if (!isLt) {
            this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
            return false;
          }
        }
        // this.$modal.loading("正在上传文件，请稍候...");
        // this.number++;
        this.fileList = [file]
        return true;
      },
      // 文件个数超出
      handleExceed() {
        this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
      },
      // 获取文件名称
      getFileName(name) {
        // 如果是url那么取最后的名字 如果不是直接返回
        if (name.lastIndexOf("/") > -1) {
          return name.slice(name.lastIndexOf("/") + 1);
        } else {
          return name;
        }
      },
      // 对象转成指定字符串分隔
      listToString(list, separator) {
        let strs = "";
        separator = separator || ",";
        for (let i in list) {
          strs += list[i].url + separator;
        }
        return strs != '' ? strs.substr(0, strs.length - 1) : '';
      },
      computeParamHD(form){
        var that = this
        this.$refs.wform.validate(valid => {
          if (!valid) return
          let formData = new FormData()
          formData.append('wd',form.wd)
          formData.append('materialtype',form.materialtype)
          service.computeParamWD(formData).then(res => {
            this.$set(this.form, "ktb", res.data.value)
            this.wdModel1 = false
          }).catch((err)=>{
            if(err.code == 500){
              that.$modal.msgError(err.mas);
            }
          })
        })
      },
      computeParamWD(form){
        var that = this
        this.$refs.wform.validate(valid => {
          if (!valid) return
          let formData = new FormData()
          formData.append('wd',form.wd)
          formData.append('materialtype',form.materialtype)
          service.computeParamWD(formData).then(res => {
            this.$set(this.form, "kt", res.data.value)
            this.wdModel2 = false
          }).catch((err)=>{
            if(err.code == 500){
              that.$modal.msgError(err.mas);
            }
          })
        })
      },
      count(form){
        this.$refs.mform.validate(valid2 => {
          if (!valid2) return
          let formData = new FormData()
          formData.append('fx',form.fx)
          formData.append('fy',form.fy)
          formData.append('fz',form.fz)
          formData.append('mx',form.mx)
          formData.append('my',form.my)
          formData.append('mz',form.mz)
          formData.append('tw',form.tw)
          formData.append('tb',form.tb)
          formData.append('sw',form.sw)
          formData.append('aw',form.aw)
          formData.append('fa',form.fa)
          formData.append('l',form.l)
          service.jhf33Forecast(formData).then(res => {
            this.showResult = true
            // this.showSN = true
            this.logText = res.data.contents
            this.k0 = res.data.control[0].toExponential()
            this.k1 = res.data.control[1].toExponential()
            this.k2 = res.data.control[2].toExponential()
            this.k3 = res.data.control[3].toExponential()
            this.k4 = res.data.control[4].toExponential()
            this.k5 = res.data.control[5].toExponential()
            this.k6 = res.data.control[6].toExponential()
            this.k7 = res.data.control[7].toExponential()
            this.k8 = res.data.control[8].toExponential()
            this.k9 = res.data.control[9].toExponential()
            this.k10 = res.data.control[10].toExponential()
            this.k11 = res.data.control[11].toExponential()
            this.k12 = res.data.control[12].toExponential()
            this.k13 = res.data.control[13].toExponential()
            this.k14 = res.data.control[14].toExponential()
            this.k15 = res.data.control[15].toExponential()
            this.k16 = res.data.control[16].toExponential()
            this.k17 = res.data.control[17].toExponential()
            this.k18 = res.data.control[18].toExponential()
            this.k19 = res.data.control[19].toExponential()
            this.k20 = res.data.control[20].toExponential()
            this.k21 = res.data.control[21].toExponential()
            this.k22 = res.data.control[22].toExponential()
            this.k23 = res.data.control[23].toExponential()


            this.$nextTick(() => {
              this.$refs.snchart[0].initChart()
            });
          }).catch((err)=>{
            if(err.code == 500){
              that.$modal.msgError(err.mas);
            }

          })
        })
      }
    }
  };
</script>

<style scoped lang="scss">
  .app-container {
    display: block;
    padding: 5px;
    height: calc(100% - 65px);
  }
  .container-bottom{
    height: calc(100% - 295px);
    overflow: hidden;
  }

  .detail-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 20px;

    &:before, &:after {
      content: '';
      display: inline-block;
      width: 37%;
      height: 4px;
      border-bottom: 1px solid #BAD7EC;
      border-top: 1px solid #BAD7EC;
    }
  }

  .detail-title-form {
    width: 450px;
    margin: 10px auto;
    ::v-deep .el-form-item{
      margin-bottom: 15px;
    }
    ::v-deep .el-form-item__label {
      color: #084EBC;
      font-weight: normal;
    }
  }

  .container {
    width: 100%;
    display: flex;
    justify-content: space-around;
  }

  .container-warp {
    width: 100%;
    display: inline-block;
    border: 1px solid #ddd;
    background-color: #fff;
    box-shadow: 0 0 5px #eeeeee;
  }

  .container-right {
    .container-warp + .container-warp {
      margin-top: 10px;
    }
  }

  .container-left {
    width: 49%;
  }

  .container-right {
    width: 49%;
  }

  .detail-center-btn {
    display: block;
    width: 260px;
    margin: 6px auto;
  }

  .table-title {
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    height: 26px;
    color: #5184ec;
    text-indent: 10px;
    border-bottom: 1px solid #d5d5d5;
    background: url("../../../assets/images/line.png") no-repeat;
    background-position: -143px 22px;
  }

  .material-pic {
    background-color: #fff;
    border: 1px solid #CCDCE7;
    border-radius: 5px;
    width: 100%;
    max-width: 330px;
    height: 190px;
    margin-top: 15px;
    margin-left: 5px;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
      width: 209.28px;
      height: 173.6px;
    }
  }

  .material-form {
    margin-top: 10px;

    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 23%;
      margin-bottom: 12px;
    }

    ::v-deep .el-input--medium {
      width: calc(100% - 70px);
    }

    ::v-deep .el-select {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 70px) !important;
    }
  }

  .label-title {
    width: 133px;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    height: 26px;
    color: #5184ec;
    text-indent: 10px;
    border-left: 3px solid #166BCE;
    background: url("../../../assets/images/label_bg.png") no-repeat;
    background-size: 100%;
  }


  .log-warp {
    width: 96%;
    margin-left: 2%;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    padding: 5px 10px;
    height: 100%;
    font-size: 14px;
  }

  .label-log-form {
    margin-top: 5px;
    text-align: center;
  }

  .pj .el-form-item{
        float: left;
        text-align: left;
        display: inline-block;
        width: 17%;
        margin-left: 10px;
        margin-right: 10px;
        vertical-align: top;
        margin-bottom: 10px;
  }
  .pj .label-subscript{
    width:auto;
  }
  .pj .label-subscript ::after {
      content: ":";
  }

  .log-warp + .detail-center-btn {
    width: 300px;
  }

  .label-subscript {
    display: inline-block;
    width: 70px;
  }
  .dg-label-subscript {
    display: inline-block;
    width: 100px;
  }

  .structure-form {
    .label-subscript {
      width: 90px;
    }
  }
  ::v-deep .el-form-item--medium .el-form-item__content{
        line-height: 30px !important;
  }

  .structure-form {
    margin-top: 10px;
    padding: 0 10px;



    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 31%;
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input--medium {
      width: calc(100% - 90px);
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input-group__append {
      padding: 0 6px;
    }

    ::v-deep .el-select {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 90px) !important;
    }
    ::v-deep .el-cascader {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 90px) !important;
    }

  }

  .dg-structure-form {
    margin-top: 10px;
    padding: 0 10px;

    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 46%;
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input--medium {
      width: calc(100% - 100px);
      margin-bottom: 5px !important;
    }

    ::v-deep .el-input-group__append {
      padding: 0 6px;
    }
    ::v-deep .el-select {
      .el-input--medium {
        width: 100% !important;
      }

      width: calc(100% - 100px) !important;
    }
  }

  .structure-forms {
    margin-top: 10px;
    padding: 0 10px;

    ::v-deep .el-form-item__label {
      font-weight: normal;
    }

    ::v-deep .el-form-item {
      width: 48%;
      margin-bottom: 15px !important;
    }

    ::v-deep .fy {
      width: 31%;
    }

    /*::v-deep .fy .el-tooltip {*/
    /*  width: 90px !important;*/
    /*}*/

    /*::v-deep .fy .el-input--medium {*/
    /*  width: calc(100% - 90px)  !important;*/
    /*}*/

    ::v-deep .el-form-item__content {
      width: calc(100% - 125px);
    }

    .form-label-tooltip {
      ::v-deep .el-form-item__content {
        width: 100%;
      }

      ::v-deep .el-tooltip {
        width: 50px;
        display: inline-block;
      }

      ::v-deep .el-input--medium {
        width: calc(100% - 50px);
      }
    }
  }
  .divcontainer {
    position: relative;
  }

  .badge {
    position: absolute;
    cursor: pointer;
    top: -5px;
    right: -10px;
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    color: white;
    /* border-radius: 50%; */
    text-align: center;
    line-height: 30px;
  }
  .chart-warp{
    .el-carousel__item{
      width: 80%;
      margin-left: 10%;
    }
  }
  .line-warp{
    width: 98%;
    height: 4px;
    border-top: 1px dashed #bad7ec;
    border-bottom: 1px dashed #bad7ec;
    margin: 6px 1%;
  }
  ::v-deep .el-carousel__container{
    height: 100%;
  }
  .upload-file-uploader {
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
  }
  .upload-file-list .el-upload-list__item {
    border: 1px solid #e4e7ed;
    line-height: 2;
    margin-bottom: 10px;
    position: relative;
  }
  .upload-file-list .ele-upload-list__item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: inherit;
  }
  .ele-upload-list__item-content-action .el-link {
    margin-right: 10px;
  }
  .fyzh{
    display: inline-flex;
    width: 100%;
  }
  /* CSS 类用于换行 */
  .wrap-text {
    white-space: pre-line;
  }

  /* 用于处理长单词或 URL 的换行 */
  .break-word {
    word-break: break-all;
    overflow-wrap: break-word;
  }

  ::v-deep .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before{
      // content: '*' !important;
      display: none
  }

</style>
